<link rel="import" href="chrome://resources/html/polymer.html">

<link rel="import" href="chrome://downloads/search_service.html">
<link rel="import" href="chrome://downloads/browser_proxy.html">
<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
<link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="chrome://resources/html/util.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html">

<dom-module id="downloads-toolbar">
  <template>
    <style include="cr-hidden-style">
      :host {
        align-items: center;
        background: var(--google-blue-700);
        color: white;
        display: flex;
        min-height: 56px;
      }

      #toolbar {
        flex: 1;
      }

      #moreActionsContainer {
        --iron-icon-height: 20px;
        --iron-icon-width: 20px;
        height: 32px;
        padding: 6px 0;
        width: 32px;
      }
      </style>
      <cr-toolbar id="toolbar" page-name="洪流下载"      
        search-prompt="$i18n{search}" clear-label="$i18n{clearSearch}"
        spinner-active="{{spinnerActive}}" on-search-changed="onSearchChanged_">
      <paper-icon-button-light id="moreActionsContainer"
          class="dropdown-trigger">
        <button id="moreActions"
            title="$i18n{moreActions}"
            on-click="onMoreActionsTap_">
          <iron-icon icon="cr:more-vert"></iron-icon>
        </button>
      </paper-icon-button-light>
    </cr-toolbar>
    <cr-action-menu id="moreActionsMenu">
      <button slot="item" class="dropdown-item clear-all"
          on-click="onClearAllTap_">
        $i18n{clearAll}
      </button>
      <button slot="item" class="dropdown-item"
          on-click="onOpenDownloadsFolderTap_">
        $i18n{openDownloadsFolder}
      </button>
    </cr-action-menu>
  </template>
  <script src="chrome://downloads/toolbar.js"></script>
</dom-module>
